<<<<<<< .mine
﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LogicUniversityBiz;

namespace LogicUniversity.clerks
{
    public partial class outstanding : System.Web.UI.Page
    {
        protected void Page_PreInit(Object sender, EventArgs e)
        {
            //(Session["Role"]
            if (Session["Role"] as string != "Clerk")
            {
                Response.Redirect("~/Login.aspx");
            }

        }
        private OutstandingControl outstandingControl=new OutstandingControl();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List<Department> names = outstandingControl.getOutstandingDepartmentNames();

                if (names == null || names.Count <= 0)
                {
                    lblMsg.Text = "Currently No Department has outstanding";
                }
                else
                {
                    OutstandingView.DataSource = names;
                    OutstandingView.DataBind();
                }
            }
        }

        protected void linkView_Click(object sender, EventArgs e)
        {
            LinkButton btn = (LinkButton)sender;
            string[] deptInfo = btn.CommandArgument.ToString().Split(';');

            string url = "OutstandingDetail.aspx?deptcode=" + deptInfo[0]+"&deptname="+deptInfo[1];
            Response.Redirect(url);
        }
    }
}=======
﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LogicUniversityBiz;

namespace LogicUniversity.clerks
{
    public partial class outstanding : System.Web.UI.Page
    {
        private OutstandingControl outstandingControl=new OutstandingControl();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List<Department> names = outstandingControl.getOutstandingDepartmentNames();

                OutstandingView.DataSource = names;
                OutstandingView.DataBind();
            }
        }

        protected void linkView_Click(object sender, EventArgs e)
        {
            LinkButton btn = (LinkButton)sender;
            string[] deptInfo = btn.CommandArgument.ToString().Split(';');

            string url = "OutstandingDetail.aspx?deptcode=" + deptInfo[0]+"&deptname="+deptInfo[1];
            Response.Redirect(url);
        }
    }
}>>>>>>> .r28
